Skip to content

[9.4] [Fleet] Add meta:{id} to fleet schemas (#270560)#271863

Open
criamico wants to merge 4 commits into
elastic:9.4from
criamico:backport/9.4/pr-270560
Open

[9.4] [Fleet] Add meta:{id} to fleet schemas (#270560)#271863
criamico wants to merge 4 commits into
elastic:9.4from
criamico:backport/9.4/pr-270560

Conversation

@criamico
Copy link
Copy Markdown
Member

Backport

This will backport the following commits from main to 9.4:

Questions ?

Please refer to the Backport tool documentation

Fixes elastic#261258
possibly also elastic#264565 (to be
verified)

## Summary

Add `meta: { id }` to Fleet body/response schemas

Files changed:

- `server/types/models/agent_policy.ts` — versioned policy schemas
(v3–v6), `new_agent_policy`, `agent_policy`, `agent_policy_response`,
`full_agent_policy`, outputs responses
- `server/types/rest_spec/agent_policy.ts` — bulk get, copy, delete,
full policy, K8s manifest, list outputs, cleanup task request/response
schemas
- `server/types/models/enrollment_api_key.ts `— `enrollment_api_key`
- `server/types/rest_spec/enrollment_api_key.ts` — enrollment key CRUD
and bulk delete schemas
- `common/types/models/package_policy_schema.ts `— all package policy
schemas: new, versioned (v22–v24), simplified, update, response,
dry-run, status
- `server/types/rest_spec/package_policy.ts` — bulk get, create, delete,
upgrade, dry-run schemas
- `server/types/rest_spec/epm.ts `— ~40 package management schemas
(categories, package info/list/stats, install/delete/bulk operations,
etc.)
- `server/types/rest_spec/agent.ts` — `action_id_response` /
`action_message_response` branches of `ActionIdOrMessageSchema`
(resolves items #1 and #2 of elastic#264565)

### Testing
Verified locally with:
```
node scripts/capture_oas_snapshot --no-serverless --include-path /api/fleet
node scripts/validate_oas_docs
node scripts/check_api_contracts --distribution stack
```

It looks like there are no Fleet errors left after this change but the
final verification step will be ran in the ci for Terraform

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit f8da12e)

# Conflicts:
#	oas_docs/output/kibana.serverless.yaml
#	oas_docs/output/kibana.yaml
#	src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts
#	x-pack/platform/plugins/shared/fleet/common/types/models/package_policy_schema.ts
#	x-pack/platform/plugins/shared/fleet/server/types/models/agent_policy.ts
#	x-pack/platform/plugins/shared/fleet/server/types/rest_spec/enrollment_api_key.ts
#	x-pack/platform/plugins/shared/fleet/server/types/rest_spec/epm.ts
@criamico criamico requested a review from kibanamachine as a code owner May 29, 2026 09:57
@criamico criamico added the backport This PR is a backport of another PR label May 29, 2026
@criamico criamico enabled auto-merge (squash) May 29, 2026 09:57
@botelastic botelastic Bot added the Team:Fleet Team label for Observability Data Collection Fleet team label May 29, 2026
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

Pinging @elastic/fleet (Team:Fleet)

@kibanamachine kibanamachine requested review from nchaulet and removed request for kibanamachine May 29, 2026 09:58
@kibanamachine
Copy link
Copy Markdown
Contributor

kibanamachine commented May 29, 2026

💔 Build Failed

Failed CI Steps

Metrics [docs]

✅ unchanged

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:Fleet Team label for Observability Data Collection Fleet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants